<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import="java.util.ArrayList"%>
<%@page import="edu.jhu.secondhome.database.beans.User"%>
<!DOCTYPE html>
<html>
<head>
<title>Second Home Inc.</title>

<link href="jquery/jquery-ui-1.11.2.custom/jquery-ui.css" rel="stylesheet" />
<link href="jquery/jquery-ui-1.11.2.custom/jquery-ui.structure.css" rel="stylesheet" />
<link href="jquery/jquery-ui-1.11.2.custom/jquery-ui.theme.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="css/style.css">

<style type="text/css">
	div#accordion { font-size: 0.9em;
					color: black; 
					width: 400px; }
	table#content td { color: black; }
	
	table#content td input, table#content td select { font-size: 0.9em; }
</style>

<script src="jquery/jquery-1.11.1.js"></script>
<script src="jquery/jquery-ui-1.11.2/jquery-ui.js"></script>
<script>
	$(function() {
		$("#accordion").accordion({
			collapsible: true
		});
	});
</script>
</head>
<body>
	<div id="page-wrap" align="center">
		<div>
			<a href="index.jsp"><img src="images/banner.png"
				alt="Second Home Inc."></a>
		</div>
		<nav>
			<ul>
				<li><a href="index.jsp">Home</a>
					<ul>
						<li><a href="#">About</a></li>
						<li><a href="#">Contact Us</a></li>
					</ul></li>
				<li><a href="#">Reservation Management</a>
					<ul>
						<li><a href="controller?&source=createRes">Create
								Reservation</a></li>
						<li><a href="controller?&source=viewRes">View
								Reservations</a></li>
					</ul></li>
				<li><a href="controller?&source=acctManagement">Account
						Management</a></li>
				<%
				  if (request.getSession().getAttribute("user") == null)
				    out.write("        <li><a href=\"index.jsp\">Login</a></li>");
				  else
				    out.write("        <li><a href=\"controller?&source=logout\">Logout</a></li>");
				%>
			</ul>
		</nav>
		<br />
		<%
		  ArrayList<String> errors = (ArrayList<String>) request.getAttribute("errors");
		  if (errors != null && errors.size() > 0)
		  {
		    out.write("<div style=\"color:red\">");
		    out.write("<table ><tr><td>");
		    out.write("Please correct the following errors:<br /><br />");

		    for (String error : errors)
		    {
		      out.write("" + error + "<br />");
		    }
		    out.write("<br /></td></tr></table>");
		    out.write("</div>");
		  }

		  User dbUser = (User) request.getAttribute("dbUser");
		  String addr1 = "";
		  String addr2 = "";
		  String addr3 = "";
		  String city = "";
		  String state = "";
		  String zip = "";
		  
		  String billingAddr1 = "";
		  String billingAddr2 = "";
		  String billingAddr3 = "";
		  String billingCity = "";
		  String billingState = "";
		  String billingZip = "";
		  if (dbUser != null)
		  {
			addr1 = dbUser.getCurrentAddressSubField("addr1");
		    addr2 = dbUser.getCurrentAddressSubField("addr2");
		    addr3 = dbUser.getCurrentAddressSubField("addr3");
		    city = dbUser.getCurrentAddressSubField("city");
		    state = dbUser.getCurrentAddressSubField("state");
		    zip = dbUser.getCurrentAddressSubField("zip");
		    
		    billingAddr1 = dbUser.getBillingAddressSubField( "addr1" );
		    billingAddr1 = billingAddr1 == null ? "" : billingAddr1;
		    billingAddr2 = dbUser.getBillingAddressSubField("addr2");
		    billingAddr2 = billingAddr2 == null ? "" : billingAddr2;
		    billingAddr3 = dbUser.getBillingAddressSubField("addr3");
		    billingAddr3 = billingAddr3 == null ? "" : billingAddr3;
		    billingCity = dbUser.getBillingAddressSubField("city");
		    billingCity = billingCity == null ? "" : billingCity;
		    billingState = dbUser.getBillingAddressSubField("state");
		    billingState = billingState == null ? "" : billingState;
		    billingZip = dbUser.getBillingAddressSubField("zip");
		    billingZip = billingZip == null ? "" : billingZip;
		  }
		%>
		<table class="main" title="Content" id="content">
			<%
			  String msg = (String) request.getAttribute("message");
			  if (msg != null)
			  {
			    out.write("<tr><td>");
			    out.write("<div id=\"message\" style=\"text-align:center;color:white;font-size:0.9em;\">");
			    out.write(msg);
			    out.write("</div>");
			    out.write("</td></tr>");
			  }
			%>
			<tr>
				<td>
					<div id="accordion">
						<h3>Account Information</h3>
						<div>
							<form name="updateForm" action="controller?&source=updateAcct"
								method=POST>
								<table class="register">
									<tr>
										<td>E-mail:</td>
										<td><input type="TEXT" name="reg_email"
											value="${dbUser.email}"> <br /></td>
									</tr>
									<tr>
										<td>E-mail again:</td>
										<td><input type="TEXT" name="reg_email2"
											value="${dbUser.email}" autocomplete="off"> <br /></td>
									</tr>
									<tr>
										<td><br /></td>
									</tr>
									<tr>
										<td>First Name:</td>
										<td><input type="TEXT" name="reg_firstName"
											value="${dbUser.firstName}"> <br /></td>
									</tr>
									<tr>
										<td>Last Name:</td>
										<td><input type="TEXT" name="reg_lastName"
											value="${dbUser.lastName}"> <br /></td>
									</tr>
									<tr>
										<td>Phone Number:</td>
										<td><input type="TEXT" name="reg_phoneNumber"
											value="${dbUser.phoneNumber}" maxlength="12"
											style="width: 7em;"> <br /></td>
									</tr>
									<tr>
										<td><br /></td>
									</tr>
									<tr>
										<td>Address:</td>
										<td><input type="TEXT" name="reg_address1"
											value="<%=addr1%>"> <br /></td>
									</tr>
									<tr>
										<td></td>
										<td><input type="TEXT" name="reg_address2"
											value="<%=addr2%>"> <br /></td>
									</tr>
									<tr>
										<td></td>
										<td><input type="TEXT" name="reg_address3"
											value="<%=addr3%>"> <br /></td>
									</tr>
									<tr>
										<td>City:</td>
										<td><input type="TEXT" name="reg_city" value="<%=city%>">
											<br /></td>
									</tr>
									<tr>
										<td>State:</td>
										<td><select name="reg_state">
												<option value="AL"
													<%if ("AL".equals(state))
        out.write(" selected=\"selected\"");%>>AL</option>
												<option value="AK"
													<%if ("AK".equals(state))
        out.write(" selected=\"selected\"");%>>AK</option>
												<option value="AZ"
													<%if ("AZ".equals(state))
        out.write(" selected=\"selected\"");%>>AZ</option>
												<option value="AR"
													<%if ("AR".equals(state))
        out.write(" selected=\"selected\"");%>>AR</option>
												<option value="CA"
													<%if ("CA".equals(state))
        out.write(" selected=\"selected\"");%>>CA</option>
												<option value="CO"
													<%if ("CO".equals(state))
        out.write(" selected=\"selected\"");%>>CO</option>
												<option value="CT"
													<%if ("CT".equals(state))
        out.write(" selected=\"selected\"");%>>CT</option>
												<option value="DC"
													<%if ("DC".equals(state))
        out.write(" selected=\"selected\"");%>>DC</option>
												<option value="DE"
													<%if ("DE".equals(state))
        out.write(" selected=\"selected\"");%>>DE</option>
												<option value="FL"
													<%if ("FL".equals(state))
        out.write(" selected=\"selected\"");%>>FL</option>
												<option value="GA"
													<%if ("GA".equals(state))
        out.write(" selected=\"selected\"");%>>GA</option>
												<option value="HI"
													<%if ("HI".equals(state))
        out.write(" selected=\"selected\"");%>>HI</option>
												<option value="ID"
													<%if ("ID".equals(state))
        out.write(" selected=\"selected\"");%>>ID</option>
												<option value="IL"
													<%if ("IL".equals(state))
        out.write(" selected=\"selected\"");%>>IL</option>
												<option value="IN"
													<%if ("IN".equals(state))
        out.write(" selected=\"selected\"");%>>IN</option>
												<option value="IA"
													<%if ("IA".equals(state))
        out.write(" selected=\"selected\"");%>>IA</option>
												<option value="KS"
													<%if ("KS".equals(state))
        out.write(" selected=\"selected\"");%>>KS</option>
												<option value="KY"
													<%if ("KY".equals(state))
        out.write(" selected=\"selected\"");%>>KY</option>
												<option value="LA"
													<%if ("LA".equals(state))
        out.write(" selected=\"selected\"");%>>LA</option>
												<option value="ME"
													<%if ("ME".equals(state))
        out.write(" selected=\"selected\"");%>>ME</option>
												<option value="MD"
													<%if ("MD".equals(state))
        out.write(" selected=\"selected\"");%>>MD</option>
												<option value="MA"
													<%if ("MA".equals(state))
        out.write(" selected=\"selected\"");%>>MA</option>
												<option value="MI"
													<%if ("MI".equals(state))
        out.write(" selected=\"selected\"");%>>MI</option>
												<option value="MN"
													<%if ("MN".equals(state))
        out.write(" selected=\"selected\"");%>>MN</option>
												<option value="MS"
													<%if ("MS".equals(state))
        out.write(" selected=\"selected\"");%>>MS</option>
												<option value="MO"
													<%if ("MO".equals(state))
        out.write(" selected=\"selected\"");%>>MO</option>
												<option value="MT"
													<%if ("MT".equals(state))
        out.write(" selected=\"selected\"");%>>MT</option>
												<option value="NE"
													<%if ("NE".equals(state))
        out.write(" selected=\"selected\"");%>>NE</option>
												<option value="NV"
													<%if ("NV".equals(state))
        out.write(" selected=\"selected\"");%>>NV</option>
												<option value="NH"
													<%if ("NH".equals(state))
        out.write(" selected=\"selected\"");%>>NH</option>
												<option value="NJ"
													<%if ("NJ".equals(state))
        out.write(" selected=\"selected\"");%>>NJ</option>
												<option value="NM"
													<%if ("NM".equals(state))
        out.write(" selected=\"selected\"");%>>NM</option>
												<option value="NY"
													<%if ("NY".equals(state))
        out.write(" selected=\"selected\"");%>>NY</option>
												<option value="NC"
													<%if ("NC".equals(state))
        out.write(" selected=\"selected\"");%>>NC</option>
												<option value="ND"
													<%if ("ND".equals(state))
        out.write(" selected=\"selected\"");%>>ND</option>
												<option value="OH"
													<%if ("OH".equals(state))
        out.write(" selected=\"selected\"");%>>OH</option>
												<option value="OK"
													<%if ("OK".equals(state))
        out.write(" selected=\"selected\"");%>>OK</option>
												<option value="OR"
													<%if ("OR".equals(state))
        out.write(" selected=\"selected\"");%>>OR</option>
												<option value="PA"
													<%if ("PA".equals(state))
        out.write(" selected=\"selected\"");%>>PA</option>
												<option value="RI"
													<%if ("RI".equals(state))
        out.write(" selected=\"selected\"");%>>RI</option>
												<option value="SC"
													<%if ("SC".equals(state))
        out.write(" selected=\"selected\"");%>>SC</option>
												<option value="SD"
													<%if ("SD".equals(state))
        out.write(" selected=\"selected\"");%>>SD</option>
												<option value="TN"
													<%if ("TN".equals(state))
        out.write(" selected=\"selected\"");%>>TN</option>
												<option value="TX"
													<%if ("TX".equals(state))
        out.write(" selected=\"selected\"");%>>TX</option>
												<option value="UT"
													<%if ("UT".equals(state))
        out.write(" selected=\"selected\"");%>>UT</option>
												<option value="VT"
													<%if ("VT".equals(state))
        out.write(" selected=\"selected\"");%>>VT</option>
												<option value="VA"
													<%if ("VA".equals(state))
        out.write(" selected=\"selected\"");%>>VA</option>
												<option value="WA"
													<%if ("WA".equals(state))
        out.write(" selected=\"selected\"");%>>WA</option>
												<option value="WV"
													<%if ("WV".equals(state))
        out.write(" selected=\"selected\"");%>>WV</option>
												<option value="WI"
													<%if ("WI".equals(state))
        out.write(" selected=\"selected\"");%>>WI</option>
												<option value="WY"
													<%if ("WY".equals(state))
        out.write(" selected=\"selected\"");%>>WY</option>
										</select><br /></td>
									</tr>
									<tr>
										<td>Zip Code:</td>
										<td><input type="TEXT" name="reg_zip" value="<%=zip%>"
											maxlength="10" style="width: 6em"> <br /></td>
									</tr>
									<tr>
										<td><br /></td>
									</tr>
									<tr>
										<td></td>
										<td style="float: right;"><input type="SUBMIT"
											name="updateButton" value="Update Information"></td>
									</tr>
								</table>
							</form>
						</div>
						<%
						String ccExpMonth = "";
						String ccExpYear = "";
						  if ( dbUser != null )
						  {
						    ccExpMonth = dbUser.getCreditCardExpMonth( );
						    ccExpYear = dbUser.getCreditCardExpYear( );
						  }
						%>
						<h3>Payment Information</h3>
						<div>
							<form name="updateBillingInfoForm"
								action="controller?&source=updateBillingInfo" method=POST>
								<table class="register">
									<tr>
										<td>Card Number:</td>
										<td><input type="text" name="billingCardNum" value="${dbUser.creditCardNum}" /></td>
									</tr>
									<tr>
									  <td>Card Exp Month:</td>
									  <td>
									    <select name="billingExpMonth">
										  <option value="01" <%if ("01".equals(ccExpMonth)) out.write(" selected=\"selected\"");%>>01</option>
										  <option value="02" <%if ("02".equals(ccExpMonth)) out.write(" selected=\"selected\"");%>>02</option>
										  <option value="03" <%if ("03".equals(ccExpMonth)) out.write(" selected=\"selected\"");%>>03</option>
										  <option value="04" <%if ("04".equals(ccExpMonth)) out.write(" selected=\"selected\"");%>>04</option>
										  <option value="05" <%if ("05".equals(ccExpMonth)) out.write(" selected=\"selected\"");%>>05</option>
										  <option value="06" <%if ("06".equals(ccExpMonth)) out.write(" selected=\"selected\"");%>>06</option>
										  <option value="07" <%if ("07".equals(ccExpMonth)) out.write(" selected=\"selected\"");%>>07</option>
										  <option value="08" <%if ("08".equals(ccExpMonth)) out.write(" selected=\"selected\"");%>>08</option>
										  <option value="09" <%if ("09".equals(ccExpMonth)) out.write(" selected=\"selected\"");%>>09</option>
										  <option value="10" <%if ("10".equals(ccExpMonth)) out.write(" selected=\"selected\"");%>>10</option>
										  <option value="11" <%if ("11".equals(ccExpMonth)) out.write(" selected=\"selected\"");%>>11</option>
										  <option value="12" <%if ("12".equals(ccExpMonth)) out.write(" selected=\"selected\"");%>>12</option>
									    </select>
									  </td>
									</tr>
									<tr>
									  <td>Card Exp Year:</td>
									  <td>
									    <select name="billingExpYear">
										  <option value="14" <%if ("14".equals(ccExpYear)) out.write(" selected=\"selected\"");%>>14</option>
										  <option value="15" <%if ("15".equals(ccExpYear)) out.write(" selected=\"selected\"");%>>15</option>
										  <option value="16" <%if ("16".equals(ccExpYear)) out.write(" selected=\"selected\"");%>>16</option>
										  <option value="17" <%if ("17".equals(ccExpYear)) out.write(" selected=\"selected\"");%>>17</option>
										  <option value="18" <%if ("18".equals(ccExpYear)) out.write(" selected=\"selected\"");%>>18</option>
										  <option value="19" <%if ("19".equals(ccExpYear)) out.write(" selected=\"selected\"");%>>19</option>
										  <option value="20" <%if ("20".equals(ccExpYear)) out.write(" selected=\"selected\"");%>>20</option>
									    </select>
									  </td>
									</tr>
									<tr>
									  <td>Card Security Code:</td>
									  <td>
									    <input type="password" name="billingCardCode" value="" />
									  </td>
									</tr>
									<tr>
										<td><br /></td>
									</tr>
									
									<tr>
										<td>Address:</td>
										<td><input type="TEXT" name="billingAddr1"
											value="<%=billingAddr1%>"> <br /></td>
									</tr>
									<tr>
										<td></td>
										<td><input type="TEXT" name="billingAddr2"
											value="<%=billingAddr2%>"> <br /></td>
									</tr>
									<tr>
										<td></td>
										<td><input type="TEXT" name="billingAddr3"
											value="<%=billingAddr3%>"> <br /></td>
									</tr>
									<tr>
										<td>City:</td>
										<td><input type="TEXT" name="billingCity"
											value="<%=billingCity%>"> <br /></td>
									</tr>
									<tr>
										<td>State:</td>
										<td><select name="billingState">
												<option value="AL"
													<%if ("AL".equals(billingState))
        out.write(" selected=\"selected\"");%>>AL</option>
												<option value="AK"
													<%if ("AK".equals(billingState))
        out.write(" selected=\"selected\"");%>>AK</option>
												<option value="AZ"
													<%if ("AZ".equals(billingState))
        out.write(" selected=\"selected\"");%>>AZ</option>
												<option value="AR"
													<%if ("AR".equals(billingState))
        out.write(" selected=\"selected\"");%>>AR</option>
												<option value="CA"
													<%if ("CA".equals(billingState))
        out.write(" selected=\"selected\"");%>>CA</option>
												<option value="CO"
													<%if ("CO".equals(billingState))
        out.write(" selected=\"selected\"");%>>CO</option>
												<option value="CT"
													<%if ("CT".equals(billingState))
        out.write(" selected=\"selected\"");%>>CT</option>
												<option value="DC"
													<%if ("DC".equals(billingState))
        out.write(" selected=\"selected\"");%>>DC</option>
												<option value="DE"
													<%if ("DE".equals(billingState))
        out.write(" selected=\"selected\"");%>>DE</option>
												<option value="FL"
													<%if ("FL".equals(billingState))
        out.write(" selected=\"selected\"");%>>FL</option>
												<option value="GA"
													<%if ("GA".equals(billingState))
        out.write(" selected=\"selected\"");%>>GA</option>
												<option value="HI"
													<%if ("HI".equals(billingState))
        out.write(" selected=\"selected\"");%>>HI</option>
												<option value="ID"
													<%if ("ID".equals(billingState))
        out.write(" selected=\"selected\"");%>>ID</option>
												<option value="IL"
													<%if ("IL".equals(billingState))
        out.write(" selected=\"selected\"");%>>IL</option>
												<option value="IN"
													<%if ("IN".equals(billingState))
        out.write(" selected=\"selected\"");%>>IN</option>
												<option value="IA"
													<%if ("IA".equals(billingState))
        out.write(" selected=\"selected\"");%>>IA</option>
												<option value="KS"
													<%if ("KS".equals(billingState))
        out.write(" selected=\"selected\"");%>>KS</option>
												<option value="KY"
													<%if ("KY".equals(billingState))
        out.write(" selected=\"selected\"");%>>KY</option>
												<option value="LA"
													<%if ("LA".equals(billingState))
        out.write(" selected=\"selected\"");%>>LA</option>
												<option value="ME"
													<%if ("ME".equals(billingState))
        out.write(" selected=\"selected\"");%>>ME</option>
												<option value="MD"
													<%if ("MD".equals(billingState))
        out.write(" selected=\"selected\"");%>>MD</option>
												<option value="MA"
													<%if ("MA".equals(billingState))
        out.write(" selected=\"selected\"");%>>MA</option>
												<option value="MI"
													<%if ("MI".equals(billingState))
        out.write(" selected=\"selected\"");%>>MI</option>
												<option value="MN"
													<%if ("MN".equals(billingState))
        out.write(" selected=\"selected\"");%>>MN</option>
												<option value="MS"
													<%if ("MS".equals(billingState))
        out.write(" selected=\"selected\"");%>>MS</option>
												<option value="MO"
													<%if ("MO".equals(billingState))
        out.write(" selected=\"selected\"");%>>MO</option>
												<option value="MT"
													<%if ("MT".equals(billingState))
        out.write(" selected=\"selected\"");%>>MT</option>
												<option value="NE"
													<%if ("NE".equals(billingState))
        out.write(" selected=\"selected\"");%>>NE</option>
												<option value="NV"
													<%if ("NV".equals(billingState))
        out.write(" selected=\"selected\"");%>>NV</option>
												<option value="NH"
													<%if ("NH".equals(billingState))
        out.write(" selected=\"selected\"");%>>NH</option>
												<option value="NJ"
													<%if ("NJ".equals(billingState))
        out.write(" selected=\"selected\"");%>>NJ</option>
												<option value="NM"
													<%if ("NM".equals(billingState))
        out.write(" selected=\"selected\"");%>>NM</option>
												<option value="NY"
													<%if ("NY".equals(billingState))
        out.write(" selected=\"selected\"");%>>NY</option>
												<option value="NC"
													<%if ("NC".equals(billingState))
        out.write(" selected=\"selected\"");%>>NC</option>
												<option value="ND"
													<%if ("ND".equals(billingState))
        out.write(" selected=\"selected\"");%>>ND</option>
												<option value="OH"
													<%if ("OH".equals(billingState))
        out.write(" selected=\"selected\"");%>>OH</option>
												<option value="OK"
													<%if ("OK".equals(billingState))
        out.write(" selected=\"selected\"");%>>OK</option>
												<option value="OR"
													<%if ("OR".equals(billingState))
        out.write(" selected=\"selected\"");%>>OR</option>
												<option value="PA"
													<%if ("PA".equals(billingState))
        out.write(" selected=\"selected\"");%>>PA</option>
												<option value="RI"
													<%if ("RI".equals(billingState))
        out.write(" selected=\"selected\"");%>>RI</option>
												<option value="SC"
													<%if ("SC".equals(billingState))
        out.write(" selected=\"selected\"");%>>SC</option>
												<option value="SD"
													<%if ("SD".equals(billingState))
        out.write(" selected=\"selected\"");%>>SD</option>
												<option value="TN"
													<%if ("TN".equals(billingState))
        out.write(" selected=\"selected\"");%>>TN</option>
												<option value="TX"
													<%if ("TX".equals(billingState))
        out.write(" selected=\"selected\"");%>>TX</option>
												<option value="UT"
													<%if ("UT".equals(billingState))
        out.write(" selected=\"selected\"");%>>UT</option>
												<option value="VT"
													<%if ("VT".equals(billingState))
        out.write(" selected=\"selected\"");%>>VT</option>
												<option value="VA"
													<%if ("VA".equals(billingState))
        out.write(" selected=\"selected\"");%>>VA</option>
												<option value="WA"
													<%if ("WA".equals(billingState))
        out.write(" selected=\"selected\"");%>>WA</option>
												<option value="WV"
													<%if ("WV".equals(billingState))
        out.write(" selected=\"selected\"");%>>WV</option>
												<option value="WI"
													<%if ("WI".equals(billingState))
        out.write(" selected=\"selected\"");%>>WI</option>
												<option value="WY"
													<%if ("WY".equals(billingState))
        out.write(" selected=\"selected\"");%>>WY</option>
										</select><br /></td>
									</tr>
									<tr>
										<td>Zip Code:</td>
										<td><input type="TEXT" name="billingZip"
											value="<%=billingZip%>" maxlength="10" style="width: 6em">
											<br /></td>
									</tr>
									<tr>
									  <td></td>
									  <td style="float: right;"><input type="SUBMIT"
									      name="updateBillingInfo" value="Update Payment Information">
									  </td>
									</tr>
								</table>
							</form>
						</div>
						<h3>Change Password</h3>
						<div>
							<form name="changePasswordForm"
								action="controller?&source=changePassword" method=POST>
								<table class="register">
									<tr>
										<td>Current Password:</td>
										<td><input type="PASSWORD" name="reg_currPassword">
											<br /></td>
									</tr>
									<tr>
										<td><br /></td>
									</tr>
									<tr>
										<td>New Password:</td>
										<td><input type="PASSWORD" name="reg_newPassword">
											<br /></td>
									</tr>
									<tr>
										<td>New Password Again:</td>
										<td><input type="PASSWORD" name="reg_newPassword2">
											<br /></td>
									</tr>
									<tr>
										<td><br /></td>
									</tr>
									<tr>
										<td></td>
										<td style="float: right;"><input type="SUBMIT"
											name="changePasswordButton" value="Change Password">
										</td>
									</tr>
									<tr>
										<td><br /></td>
									</tr>
								</table>
							</form>
						</div>
						
						<c:if test="${dbUser.admin}">
							<h3>Grant Admin Privileges</h3>
							<div>
								<form name="grantAdminPrivileges"
									action="controller?&source=grantAdminPrivileges" method="POST">
									
									<p>Select the user you want to grant administrative privileges to:</p>
									<select name="userToGrant" size="1" id="userToGrant">
										<c:forEach items="${users}" var="nonAdmin">
											<option value="<c:out value="${nonAdmin}" />"><c:out value="${nonAdmin}" /></option>
										</c:forEach>
									</select>
									<input type="SUBMIT" style="float:right;"
											name="grantPrivilegesButton" value="Grant Privileges">
											
								</form>
							</div>
							<h3>Revoke Admin Privileges</h3>
							<div>
								<form name="revokeAdminPrivileges"
									action="controller?&source=revokeAdminPrivileges" method="POST">
									
									<p>Select the user you want to revoke administrative privileges from:</p>
									<select name="userToRevoke" size="1" id="userToRevoke">
										<c:forEach items="${admins}" var="admin">
											<option value="<c:out value="${admin}" />"><c:out value="${admin}" /></option>
										</c:forEach>
									</select>
									<input type="SUBMIT" style="float:right;"
											name="revokePrivilegesButton" value="Revoke Privileges">
									
								</form>
							</div>
						</c:if>
					</div>
				</td>
			</tr>
		</table>
	</div>
</body>
</html>